#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
  int n,x,i=0;
  double jige=0;
  double youxiu=0;
  cin>>n;
  for(i=1;i<=n;i++)
  {
    cin>>x;
    if(x>60) jige++;
    if(x>85) youxiu++;
  }
  jige=jige/n*100;
  youxiu=youxiu/n*100;
  cout<<setprecision(0)<<fixed<<jige<<"%"<<endl;
  cout<<setprecision(0)<<fixed<<youxiu<<"%"<<endl;
  return 0;
}
